package com.tt.utils.wordUtils.renderplicy;

import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import com.deepoove.poi.util.TableTools;
import org.apache.poi.xwpf.usermodel.XWPFTable;


/**
 * @Title: TableRenderPolicy
 * @Author zl
 * @Package com.oberyun.goHAZOP.utils.wordUtils
 * @Date 2025/9/4 18:07
 * @description: 表格渲染（支持动态表头）
 */
public class TableRenderV3Policy extends LoopRowTableRenderPolicy {

    @Override
    protected void afterloop(XWPFTable table, Object data) {
        //横向合并
        TableTools.mergeCellsHorizonal(table, 0, 0, 1);
        //纵向合并
        TableTools.mergeCellsVertically(table, 0, 1, 2);
    }
}
